// 
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2005 - 2014 Media Design School
//
// File Name	: Renderer.h
// Desrciption	: CRenderer declaration file.
// Author(s)	: Hayden Asplet.
// Mail			: hayden.asplet@mediadesignschool.com
//

#pragma once

#ifndef __RENDERER_H__
#define __RENDERER_H__

#include <Windows.h>
#include "../../Utilities/Point.h"

//---------------------------------------------------------
// CRenderer encapsulates the back buffer implementation to
// a single class.
//
// This class is only used within the CGameApp and just
// encapsulates the more rendering specific code.
//---------------------------------------------------------

class CRenderer {
	// Member Functions
public:
	CRenderer();
	~CRenderer();

	bool Init(HWND _hWnd, int _iScreenWidth, int _iScreenHeight);
	void Clear();
	void Render();

	void SetScreenSize(const CPoint& _screenSize);

	HDC GetDCBuffer() const;
	HDC GetDCMem() const;
protected:
private:

	// Member Variables
public:
protected:
private:
	HWND m_hWnd;
	HDC m_hdcBuffer;
	HDC m_hdcMem;

	HBITMAP m_hbmBuffer;
	HBITMAP m_hbmOldBuffer;

	CPoint m_screenSize;
};

#endif